<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加内容</title>
<load href="__PUBLIC__/css/bootstrap.min.css" />
<import type='css' file="css.main" />
<load href="__PUBLIC__/js/jquery-1.9.1.min.js" />
<load href="__PUBLIC__/js/jquery-ui.min.js" />
<import type='js' file="js.main" />
<import type='js' file="js.setshowflag" />
<script type="text/javascript">
$(function(){

	var extstr = "{$article_info.extendattr}";
	var arr = extstr.split(",");
	for(var i in arr){
		set_flag_v(arr[i]);
	}
	function set_flag_v(v){
		$("input.extendedattr").each(function(index, element) {
			var t = $(this);
			if(t.val()==v){
				t.attr("checked","checked");	
			}
		});
	}

})
</script>
</head>

<body id="body">
<div class="main-frame">
	<div class="position">华人码 > 资源内容管理</div>
	<!-- 图片资源开始 -->
	<div class="floatBackground" id="floatBackground" style="display: none;">
		<div class="bounced">
		<label class="closeImgResurces">X</label>
		<iframe id="imgResourcesiframe" src="{:rtrim(U('Upload/index'),'.html')}" width="750" height="465" frameborder="0" scrolling="auto"></iframe>
		</div>
	</div>
	<!-- 图片资源结束 -->
	<div class="addobject">
		<div class="obj-form">
			<form name="form1" id="form1" action="<if condition="$edit eq 'true'">{:U('Pcontent/p_edit')}<else/>{:U('Pcontent/p_add')}</if>" method="post" class="form-inline">
				<input type="hidden" name="plate_article_id" value="{$article_id}" />
				<if condition="$edit neq 'true'"><input type="hidden" name="plate_id" value="{$plate_id}" /></if>
				<ul>
					<li>
						<label class="fl tle">所属版块：</label>
						<span class="fl cnt">{$plate_info}</span>
					</li>
					<li>
						<label class="fl tle">资源标题：</label>
						<span class="fl cnt">
						<input name="title" class="form-control" placeholder="资源标题" style="width: 450px;" value="{$article_info['title']}"><em>*</em>
						</span>
					</li>
					<li>
						<label class="fl tle">缩略图：</label>
						<span class="fl cnt"><input name="pic" id="pic" class="form-control" placeholder="缩略图" style="width: 450px;" value="{$article_info['pic']}"><a class="browse" f='pic'>浏览···</a></span>
					</li>
					<if condition="$fuhua['pic'] neq ''">
						<li style="margin-top: -15px;">
							<label class="fl tle">&nbsp;</label>
							<span class="fl cnt"><img src="{$fuhua['pic']}" height="80" /></span>
						</li>
					</if>
					<li>
						<label class="fl tle">扩展属性：</label>
						<span class="fl cnt">
							<input type="checkbox" value="c" name="extendattr[]" class="extendedattr">推荐
							<input type="checkbox" value="j" name="extendattr[]" class="extendedattr specifiedjump">跳转
						</span>
					</li>
					<li class="clickjump" <if condition="$article_info['jumplink'] neq ''">style="display:block;"</if>>
						<label class="fl tle">跳转网址：</label>
						<span class="fl cnt">
						<input name="jumplink" class="form-control" placeholder="跳转网址" style="width: 450px;" value="{$article_info['jumplink']}">
						</span>
					</li>
					<li>
						<label class="fl tle">音频地址：</label>
						<span class="fl cnt">
							<textarea name="audiopath" class="form-control" placeholder="音频地址" style="width: 760px; height:50px;">{$article_info['audiopath']}</textarea> <font style="color: #999;"><a href="http://vf.hrtv.cn/videocode/" target="_blank">点击这里</a> 获取音乐地址</font>
						</span>
					</li>
					<li>
						<label class="fl tle">视频地址：</label>
                        <span class="fl cnt"><textarea name="videopath" class="form-control" placeholder="视频地址" style="width: 900px; height:60px;">{$article_info['videopath']}</textarea></span>
					</li>

				    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/UEditor/ueditor.config.js"></script>
				    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/UEditor/ueditor.all.min.js"> </script>
				    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/UEditor/lang/zh-cn/zh-cn.js"></script>
					<li>
						<label class="fl tle">资源详情：</label>
						<span class="fl cnt">
							<textarea name="content" id="editor" style="width: 900px; height:350px; overflow: hidden;">{$article_info['content']}</textarea>
							<script>var ue = UE.getEditor('editor');</script>
						</span>
					</li>

					<li><span class="dividerline"></span></li>

					<li>
						<label class="fl tle">资源状态：</label>
						<span class="fl cnt">
							<if condition="$edit eq 'true'">
								<input class="radio" type="radio" name="state" value="1" <if condition="$article_info['state'] eq 1">checked="checked"</if>> 开启
								<input class="radio" type="radio" name="state" value="0" <if condition="$article_info['state'] neq 1">checked="checked"</if> style="margin-left:10px;"> 关闭
							<else/>
								<input class="radio" type="radio" name="state" value="1" checked="checked"> 开启
								<input class="radio" type="radio" name="state" value="0" style="margin-left:10px;"> 关闭
							</if>

							<font style="color: #999; margin-right:15px;">（默认开启）</font>
                             	发布人：<input name="issuer" class="txtlength200" style="width: 100px; margin-right:15px;" placeholder="{$Think.session.userinfo.username}" value='{$Think.session.userinfo.username}' readonly="readonly">
                             	发布日期：<input name="u_date" class="txtlength200" style="width: 160px;" placeholder="发布日期" value="<if condition="$edit eq 'true'">{$article_info['u_date']}<else/>{:date('Y-m-d H:i:m')}</if>">
						</span>
					</li>
					<li class="submit">
						<label class="fl tle">&nbsp;</label>
						<span class="fl cnt"><input type="submit" value="发 布" class="submitbtn" /></span>
					</li>
				</ul>
			</form>
		</div>
		<div class="obj-previewimg">
			<div class="instructions">
				<b>备注说明：</b><br>
				1、带有红色  “ * ” 项必填<br>
			</div>
		</div>
	</div>

</div>
</body>
</html>
